Skip to content

Conversation

@rodrigoprimo
Copy link
Collaborator

Description

In preparation for PHPCS 4.0, which changes the tokenization of namespaced names, this PR adds tests with all forms of namespaced function calls (partially qualified, fully qualified, and namespace-relative using the 'namespace' keyword) as well as fully qualified global function calls to the sniffs that extend the AbstractFunctionParameterSniff class when necessary. Some test files already contained part or all of the required tests.

Tests for WordPress.WP.EnqueuedResourceParameters are not included in this PR as they would conflict with #2630. I will add tests for this sniff in a separate PR once #2630 is merged.

In some cases, it was necessary to move syntax error tests to a separate file before adding the new tests.

Suggested changelog entry

N/A

@rodrigoprimo
Copy link
Collaborator Author

Moved to draft pending the review of #2620

@rodrigoprimo rodrigoprimo force-pushed the abstract-function-parameter-sniffs-tests branch from fbcdd23 to 1b63aec Compare November 14, 2025 18:52
@rodrigoprimo rodrigoprimo force-pushed the abstract-function-parameter-sniffs-tests branch from 1b63aec to 6040916 Compare December 9, 2025 19:23
@rodrigoprimo rodrigoprimo force-pushed the abstract-function-parameter-sniffs-tests branch from 6040916 to 2db68b0 Compare December 9, 2025 19:24
Doing this to allow for additional testcase files.
I'm adding three different tests for fully qualified global function calls to cover all the global functions that are referenced directly in the `I18nSniff::process_matched_token()` method.
@rodrigoprimo rodrigoprimo force-pushed the abstract-function-parameter-sniffs-tests branch from 2db68b0 to d476988 Compare December 9, 2025 19:29
@rodrigoprimo rodrigoprimo marked this pull request as ready for review December 9, 2025 19:41
@rodrigoprimo
Copy link
Collaborator Author

@jrfnl, since another PR was reviewed earlier today, I'm marking this one as ready for review now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant